package com.zjl.spring.service;

import com.zjl.spring.common.Response;
import com.zjl.spring.exception.DBException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

/**
 * @Auther: zhuangjl
 * @Date: 2021/11/11 16:06
 */
@Service
public class DBService {

    private final Logger LOG = LoggerFactory.getLogger(DBService.class);

    public Response execute(){

        LOG.info("DBService执行了");
        try {
            int i = 1 / 0;
        } catch (Exception e) {
            throw new DBException();
        }
        return Response.buildSuccess();

    }
}
